home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Freelog 121
/
FreelogMagazineJuilletAout2014-No121.iso
/
Outils
/
Adobe-Air
/
adobe-air_13.exe
/
[0]
/
setup.swf
/
scripts
/
mx
/
utils
/
ArrayUtil.as
next >
Wrap
Text File
|
2014-03-27
|
949b
|
47 lines
package mx.utils
{
import mx.core.mx_internal;
use namespace mx_internal;
public class ArrayUtil
{
mx_internal static const VERSION:String = "3.0.0.0";
public function ArrayUtil()
{
super();
}
public static function getItemIndex(param1:Object, param2:Array) : int
{
var _loc3_:int = param2.length;
var _loc4_:int = 0;
while(_loc4_ < _loc3_)
{
if(param2[_loc4_] === param1)
{
return _loc4_;
}
_loc4_++;
}
return -1;
}
public static function toArray(param1:Object) : Array
{
if(!param1)
{
return [];
}
if(param1 is Array)
{
return param1 as Array;
}
return [param1];
}
}
}